/*
 * cFontManager.h
 *
 *  Created on: 06.04.2012
 *      Author: e_krais
 */

#ifndef CFONTMANAGER_H_
#define CFONTMANAGER_H_

#include "../globals.h"
#include "cGraphics.h"
#include <SDL/SDL_ttf.h>

namespace strator {


class cFont
{
public:
	cFont(std::string fontName, uint size);
	~cFont();

	//void Load(std::string fontName);
	//void SetSize(uint size);
	uint GetSize();
	void Draw(std::string text, GLfloat x, GLfloat y);
	void SetForeColor(SDL_Color foreColor);
	void SetBackColor(SDL_Color backColor);
private:
	TTF_Font* 	m_font;
	uint 		m_size;
	SDL_Color m_foreColor;
	SDL_Color m_backColor;
	std::string m_fontName;
	bool m_static;
};

class cFontManager {
public:
	friend class cEngine;
	friend class cFont;
	cFontManager();
	virtual ~cFontManager();

private:
	std::vector<cFont*> m_fonts;
	void RegisterFont(cFont* font);
	void UnregisterFont(cFont* font);
	void Initialize();
};

}

#endif /* CFONTMANAGER_H_ */
